﻿using SqlSugar;
using System.Text.Json.Serialization;

namespace Blog.Models.Entitys
{
    public class BaseEntity
    {
        /// <summary>
        /// 主键 自增长
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键Id")]
        public int Id { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [JsonIgnore]
        [SugarColumn(ColumnDescription = "是否删除,默认为false")]
        public bool IsRemove { get; set; } = false;

        /// <summary>
        /// 创建时间
        /// </summary>
        [JsonIgnore]
        [SugarColumn(ColumnDescription = "创建时间,默认为当前时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;
    }
}